# meta %>%
# filter(su_tract == 1) %>%
# select(varname, about) %>% as.list()
glimpse(cvldat)
## Rows: 50
## Columns: 10
## $ tract <chr> "51003010100", "51003010201", "51003010202", "51003010300…
## $ resproviders <int> 7, 7, 7, 8, 11, 9, 8, 8, 7, 7, 8, 7, 8, 8, 9, 10, 9, 9, 8…
## $ bb253_num <int> 5, 5, 5, 6, 8, 7, 6, 5, 5, 5, 6, 5, 6, 6, 7, 8, 7, 7, 6, …
## $ bb253_per <dbl> 71.4, 71.4, 71.4, 75.0, 72.7, 77.8, 75.0, 62.5, 71.4, 71.…
## $ bbmin_dl <dbl> 0.500, 1.500, 0.500, 0.500, 0.500, 0.500, 2.000, 1.500, 2…
## $ bbmax_dl <int> 987, 987, 987, 1000, 1000, 1000, 1000, 987, 987, 987, 100…
## $ bbmin_up <dbl> 0.064, 0.064, 0.064, 0.064, 0.064, 0.064, 0.064, 0.064, 0…
## $ bbmax_up <int> 940, 940, 940, 1000, 1000, 1000, 1000, 940, 940, 940, 100…
## $ avgMaxAdDown <dbl> 41.75557, 81.67560, 118.76747, 109.63154, 62.14468, 153.1…
## $ avgMaxAdUp <dbl> 2.987080, 5.344095, 7.070000, 6.363328, 16.902442, 41.723…
cvldat %>% select(-c(tract)) %>%
select(where(~is.numeric(.x))) %>%
as.data.frame() %>%
stargazer(., type = "text", title = "Summary Statistics", digits = 2,
summary.stat = c("mean", "sd", "min", "median", "max"))
##
## Summary Statistics
## ==================================================
## Statistic Mean St. Dev. Min Median Max
## --------------------------------------------------
## resproviders 8.24 1.24 6 8 12
## bb253_num 5.86 1.01 3 6 8
## bb253_per 71.01 5.73 50.00 71.40 80.00
## bbmin_dl 1.09 0.63 0.50 1.00 2.00
## bbmax_dl 1,176.36 1,273.33 987 1,000 10,000
## bbmin_up 0.09 0.09 0.06 0.06 0.38
## bbmax_up 1,021.10 1,340.80 35 1,000 10,000
## avgMaxAdDown 134.82 64.75 38.90 129.58 249.20
## avgMaxAdUp 32.59 35.21 2.59 15.27 116.84
## --------------------------------------------------
cvldat %>%
pivot_longer(-tract, names_to = "measure", values_to = "value") %>%
mutate(measure = factor(measure, levels = c("resproviders", "bb253_num", "bb253_per",
"avgMaxAdDown", "avgMaxAdUp",
"bbmax_dl", "bbmax_up", "bbmin_dl", "bbmin_up"))) %>%
ggplot(aes(x = value, fill = measure)) +
scale_fill_viridis(option = "plasma", discrete = TRUE, guide = FALSE) +
geom_histogram() +
facet_wrap(~measure, scales = "free")
meta %>%
filter(varname %in% c("resproviders", "bb253_num", "bb253_per", "avgMaxAdDown", "avgMaxAdUp", "bbmax_dl", "bbmax_up", "bbmin_dl", "bbmin_up")) %>%
mutate(label = paste0(varname, ": ", about)) %>%
select(label) %>%
as.list()
$label [1] “resproviders: The number of consumer internet providers in the su”
[2] “bb253_num: The number of residential broadband providers providing service that meets the FCC benchmark for "advanced telecommunications capability", 25/3 Mbps” [3] “bb253_per: The percent of residential broadband providers providing service that meets the FCC benchmark for "advanced telecommunications capability", 25/3 Mbps” [4] “bbmin_dl: The minimum advertised download speed provider in the su”
[5] “bbmax_dl: The maximum advertised download speed provider in the su”
[6] “bbmin_up: The minimum advertised upload speed provider in the su”
[7] “bbmax_up: The maximum advertised upload speed provider in the su”
[8] “avgMaxAdDown: The average maximum advertised download speed by each broadband provider in the su”
[9] “avgMaxAdUp: The average maxmum advertised upload speed by each broadband provider in the su”
pal <- colorNumeric("plasma", reverse = TRUE, domain = mapdat$resproviders)
leaflet() %>%
addProviderTiles("CartoDB.Positron") %>%
addPolygons(data = mapdat,
fillColor = ~pal(resproviders),
weight = 1,
opacity = 1,
color = "white",
fillOpacity = 0.6,
highlight = highlightOptions(
weight = 2,
fillOpacity = 0.8,
bringToFront = T
),
popup = paste0("GEOID: ", mapdat$GEOID, "<br>",
"Number of residential providers: ", mapdat$resproviders)
) %>%
addLegend("bottomright", pal = pal, values = mapdat$resproviders,
title = "Number of residential <br> providers", opacity = 0.7)
pal <- colorNumeric("plasma", reverse = TRUE, domain = mapdat$avgMaxAdDown)
leaflet() %>%
addProviderTiles("CartoDB.Positron") %>%
addPolygons(data = mapdat,
fillColor = ~pal(avgMaxAdDown),
weight = 1,
opacity = 1,
color = "white",
fillOpacity = 0.6,
highlight = highlightOptions(
weight = 2,
fillOpacity = 0.8,
bringToFront = T
),
popup = paste0("GEOID: ", mapdat$GEOID, "<br>",
"Average max advertised <br> download speeds: ", round(mapdat$avgMaxAdDown, 2))
) %>%
addLegend("bottomright", pal = pal, values = mapdat$avgMaxAdDown,
title = "Average maximum <br>advertised <br>download speeds", opacity = 0.7)
pal <- colorNumeric("plasma", reverse = TRUE, domain = mapdat$bbmax_dl)
leaflet() %>%
addProviderTiles("CartoDB.Positron") %>%
addPolygons(data = mapdat,
fillColor = ~pal(bbmax_dl),
weight = 1,
opacity = 1,
color = "white",
fillOpacity = 0.6,
highlight = highlightOptions(
weight = 2,
fillOpacity = 0.8,
bringToFront = T
),
popup = paste0("GEOID: ", mapdat$GEOID, "<br>",
"Max available <br> advertised download speeds: ", round(mapdat$bbmax_dl, 2))
) %>%
addLegend("bottomright", pal = pal, values = mapdat$bbmax_dl,
title = "Max available <br>advertised <br> download speeds", opacity = 0.7)